package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatFlow;
import com.indusfo.spc.pojo.MatStation;
import com.indusfo.spc.pojo.MatStation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/21 10:35
 * @Version 1.0
 */
public interface MatStationMapper {
    /**
     * 添加
     */
    int insertMatStation(MatStation matStation);

    /**
     * 修改
     */
    int updateMatStation(MatStation matStation);

    /**
     * 查询
     */
    List<MatStation> queryMatStation(MatStation matStation);

    /**
     * 条数
     */
    int countMatStation(MatStation matStation);

    /**
     * 判重
     */
    int checkMatStation(MatStation matStation);

    /**
     * 删除
     */
    int deleteMatStation(@Param("matStationIds") List<Integer> matStationIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatStation> queryMatStationByMatFlowId(@Param("matFlowId") Integer matFlowId);

    /**
     * 级联删除
     */
    int deleteMatStationByMatStationId(@Param("matStationId") Integer matStationId, @Param("dataState") Integer dataState);

    /**
     * 通过matFlowList获取到matStation
     * @param matFlowList
     * @return
     */
    List<MatStation> queryMatStationByMatFlowList(@Param("matFlowList")List<MatFlow> matFlowList);

}